# Contributor: prspkt <prspkt@protonmail.com>
# Maintainer: prspkt <prspkt@protonmail.com>
pkgname=py3-cmd2
pkgver=2.3.3
pkgrel=1
pkgdesc="Tool for building interactive command line applications in Python"
url="https://github.com/python-cmd2/cmd2"
arch="noarch"
license="MIT"
depends="python3 py3-attrs py3-pyperclip py3-wcwidth"
makedepends="py3-setuptools"
checkdepends="py3-pytest py3-pytest-mock py3-pytest-xdist py3-pytest-cov"
source="https://files.pythonhosted.org/packages/source/c/cmd2/cmd2-$pkgver.tar.gz
	remove-setuptools_scm.patch
	"
builddir="$srcdir/cmd2-$pkgver"

prepare() {
	default_prepare
	sed -i "s/%VERSION%/$pkgver/" setup.py
}

build() {
	python3 setup.py build
}

check() {
	pytest
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="
30d7a82a1c3d23431a40a7e99f10a4c23227e9ab073ab1d7fd83e516f54e9c90bda10e6072b50c0a2ca435498c1060e06b32a550409721899e28d2662995a8b8  cmd2-2.3.3.tar.gz
8a6499b22d0a00f9b450313035510db7f0241a72cec49644ed3e7e88c34a94e1d43ae57dfe9107a47d7b48475651485283888ea07db2da128737670ffbeacd81  remove-setuptools_scm.patch
"
